<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://www.springframework.org/tags" prefix="s"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title></title>

<SCRIPT type="text/javascript">

$(document).ready(function(){

	$(function(){
		$('#birthDate').datepicker({
		dateFormat: 'dd/mm/yy',
		changeYear: true,
		yearRange: "1960:2010"
		});
	});

});

</script>

</head>
<body>
<h4>Post New Job</h4>

<form:form action="newJob" commandName="newJobForm" method="POST">

	<s:bind path="*">
		<c:if test="${status.error}">
			<div id="message" class="error">Form has errors</div>
		</c:if>
	</s:bind>
	<fieldset><legend>New Job Form</legend>
	<div align="center">
	<table class="form-table" border="0" style="margin: 0 auto; width: 100%;">
		<tr>
			<td colspan="4">
			<h3>Post a new Job.</h3>
			<p>
			Fields marked with <span class="mandatory">*</span> are mandatory.<br/>
			<br/>
			</p>
			</td>
		</tr>
		<tr>
			<td width="120"><form:label path="jobTitle">Job Title<span class="mandatory">*</span></form:label></td>
			<td><form:input path="jobTitle" id="jobTitle" cssStyle="width:423px;" maxlength="499"/></td>
			<td colspan="2" class="error" width="250">&nbsp;<form:errors
				path="jobTitle" cssStyle="color:red;" /></td>
		</tr>
		<tr>
			<td width="120"><form:label path="keySkills">Key Skills<span class="mandatory">*</span></form:label></td>
			<td><form:textarea path="keySkills" id="keySkills" 
				 rows="5" cols="50" /></td>
			<td colspan="2" class="error" width="250">&nbsp;<form:errors
				path="keySkills" cssStyle="color:red;" /></td>
		</tr>
		<tr>
			<td width="120"><form:label path="jobDescription">Job Description<span class="mandatory">*</span></form:label></td>
			<td><form:textarea path="jobDescription" id="jobDescription" 
				 rows="30" cols="50" /></td>
			<td colspan="2" class="error" width="250">&nbsp;<form:errors
				path="jobDescription" cssStyle="color:red;" /></td>
		</tr>
		<tr>
			<td width="120">&nbsp;</td>
			<td><input type="submit" value="Post Job" class="button"
				style="width: 100px;" /></td>
			<td colspan="2" width="250">&nbsp;</td>
		</tr>
	</table>
	</div>
	</fieldset>
</form:form>
</body>
</html>